from aiogram import types

def prepare_keyboard(keys: tuple) -> types.ReplyKeyboardMarkup:
    keyboard = types.ReplyKeyboardMarkup(resize_keyboard=True)
    for k in keys:
        keyboard.add(k)
    return keyboard


def prepare_inline_keyboard(keys: list[tuple[str, int]], act_name: str) -> types.InlineKeyboardMarkup:
    keyboard = types.InlineKeyboardMarkup()
    for k in keys:
        keyboard.add(types.InlineKeyboardButton(
            text=k[0],
            callback_data=f'{act_name}_{k[1]}'
        ))
    return keyboard

